#include"slist.h"
void test1()
{
	SListNode* plist = BuySListNode(1);
	SListNode* node1 = BuySListNode(1);
	SListNode* node2 = BuySListNode(2);
	SListNode* node3 = BuySListNode(3);
	SListNode* node4 = BuySListNode(4);

	plist = node1;
	node1->next = node2;
	node2->next = node3;
	node3->next = node4;
	SListPushBack(&plist, 5);
	SListPrint(plist);
	SListPushFront(&plist, 0);
	SListPrint(plist);
	SListPopBack(&plist);
	SListPrint(plist);
	SListPopFront(&plist);
	SListPrint(plist);
	SListNode*newnode = SListFind(plist, 3);
	printf("%d\n", newnode->data);
	SListInsertAfter(node2, 3);
	SListPrint(plist);
	SListInsertFront(&plist,node2, 2);
	SListPrint(plist);
	SListEraseAfter(node2);
	SListPrint(plist);
	SListErase(&plist, node2);
	SListPrint(plist);
	SListDestory(&plist);
}
int main()
{
	test1();
	return 0;
}